package cn.wsalix.admin.entity;

import javax.persistence.Entity;
import javax.persistence.Table;

import lombok.Data;
import lombok.EqualsAndHashCode;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import cn.anlaser.entity.RelatedEntity;

@Entity
@Table(name = "ADMIN_ROLE_MENU")
@DynamicInsert
@DynamicUpdate
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
@Data
@EqualsAndHashCode(callSuper = false)
public class RoleMenu extends RelatedEntity<SysRole, SysMenu> {
	/**
	 * 
	 */
	/*private static final long serialVersionUID = 8540252991643316222L;
	@ManyToOne(cascade = CascadeType.MERGE, optional = false, fetch = FetchType.LAZY)
	@JoinColumn(name = "ROLE_ID")
	private SysRole role;

	@ManyToOne(cascade = CascadeType.MERGE, optional = false, fetch = FetchType.LAZY)
	@JoinColumn(name = "MENU_ID")
	private SysMenu menu;

	@Override
	public void setPreFix2(SysRole preFix) {
		this.role = preFix;
	}

	@Override
	public void setPostFix2(SysMenu postFix) {
		this.menu = postFix;
	}*/

}
